class CreateTools < ActiveRecord::Migration
  def self.up
    create_table :tools do |t|
      t.string :code,
        :name,
        :version,
        :key_words
        
      t.string :support_web, :default => 'yes'
      t.string :support_sms, :default => 'no'
      t.string :support_email, :default => 'no'
                
      t.integer :option_value, :default => 0
      t.integer :options_count, :default => 0
      t.integer :options_value_1_count, :default => 0
      t.integer :options_value_2_count, :default => 0
      t.integer :options_value_3_count, :default => 0
      t.integer :options_value_4_count, :default => 0
      t.integer :options_value_5_count, :default => 0
      t.integer :user_tool_settings_count, :default => 0
      t.integer :carers_count, :default => 0      
        
      t.text :synopsis,
        :introduce,
        :version_statement                      
        
      t.date :released_on
      
      t.integer :default_column, :default => 1
      
      t.string :index_url_in_show
      t.string :index_url_in_portalet
        
      t.timestamps
    end
  end

  def self.down
    drop_table :tools
  end
end
